Events

 

Events, called triggers by some, allow you the flexibility of being able to program different commands whenever you encounter a specified text that comes across your screen.  There are two types of events: text and status and each are described below.  Before we move on, please read the following warning regarding using events in your everyday adventuring.

 

WARNING: While events are easily configured and very versatile, you want to be very careful when using them to run your character.  If, at any time, you are using a series of events to keep your character active, without you actually being at the keyboard, you run the risk of running a robot or “bot.”  On some MUDs, this is highly illegal and could result in the removal of your character. Please consult your MUD’s policy on robot programs/events/triggers/bots for more information.

 

Events also give you the power to populate variables with values in specific text patterns that come across the screen.  This functionality is extremely powerful and is explained more as we move along.  For more details on how variables work in Portal©, refer to the Variable Maintenance and Using Variables help files.

 

Note: Events will be active if you’re in another screen.  If that screen is either part of the client or another application, you events will still fire off when the appropriate text appears.

 

Note: You can choose to disable ALL events via the main screen if you desire.  Clicking the Event Enabler (the lighted E) on the status bar will do this.  Clicking the dimmed E will re-enable the events.  You can also use the activator character to effect this enabling as well.  Please see the help file on the activator character for more.

 

Events Screen Elements

 

Group Selection Box

Events are assigned into a series of groups, each of which can have up to 25 event/command combinations maximum.  Choosing a group in this field will populate the Events Grid with all the events unique to that group.  Please see the help section on groups for more information on using groups with events.  Use the light blue arrow buttons to navigate between different groups.

 

Quick Event Button

This button allows you to quickly whip-up an event, creating any variables you need on the fly.  It’s highly suggested that you read the rest of this help file and the help files for variable usage before making quick events containing variables).  More information about using the Quick Event feature is contained at the bottom of this file.

 

Text Events Tab

 

 

Events Grid

This grid displays all events that reside in the currently selected group.  If you chose a specific color for the event text to appear in, the event will be displayed in that color.

The “C” column designates whether or not the event is case sensitive

The “F” column designates whether or not the event is filtered

The “R” column designates whether or not the event is retained on filtering

The “T” column designates whether or not the event is terminal

 

Note: In the grid, you have some special right-click options.  You can quickly disable/enable an individual event by right clicking on it.  Right-clicking on any individual event also allows you to quickly move the event to another group.  When an event is moved to another group, it assumes the last position in the Terminal Order for the group it is moved to (see the New Event help file)

 

Delete Button

This button will delete the currently selected event in the Events Grid.  There is no undo for this, so make sure before you do it.

 

Disable/Enable Button

This button will enable/disable the currently selected event.  Disabled events are not deleted, but are simply deactivated from use.

 

Copy Button

This button allows you to copy events to another group.

 

Up/Down Arrow Buttons (green triangles pointing up and down)

Moves the selected event up/down one position in the Terminal Order (see the New Event help file)

 

Add Event Button

Pressing this button will bring up the new/edit event screen and allow you to create a new event.

 

Edit Event Button

Pressing this button will bring up the new/edit event screen and allow you to edit the selected event.

 

Variables Button

Pressing this button will bring up the variable maintenance screen and allow you to develop variables.

 

Variables Field

This read-only field lists the variables (if any) assigned to the current event.  This field is only displayed if there are any variables assigned to the selected event.

 

Event Script

This script displays all commands assigned to the event currently selected in the grid.  If the script is empty, there are no commands currently assigned to that event.  You can freely edit as you like in this field.  Each individual line will be read as an individual command when the event is executed.

 

Script Buttons

Undo Undo Undoes any changes recently made to the script
 A/M Alias/Macro grabber Insert an alias or macro
 f(x) Function grabber Insert a function into the script
 @ Variable grabber Insert a specific variable into the script
 Eraser Clear script Clears the entire script

 

Note: You can enter comments/remarks into scripts by using the letters "REM" (all must be uppercase) as the first three characters in the command.  This basically tells Portal© to completely ignore that line.

 

Enable Event Sounds Checkbox

If this box is checked, sounds generated by events will be heard.  If your computer does not support sounds, this option will be automatically turned off whenever a sound attempts to play.

 

Automatically Lowercase Event Variables

Most times when a variable is populated via an event, you will desire the lowercase version to be passed.  This is true in the example that you want “Bob smiles at you” to be parsed as “bob” so that you can then “smile bob” or do whatever else as “smile Bob” won’t work.  Checking this checkbox will force all variables set by an event to be set as lowercase.  This is the same as using the lc() function around the resulting variable.

 

Close Button

Closes the Events Screen.

 

Status Events Tab

 

 

Status events are handy helpers that are activated whenever the appropriate status bars enter either the “low” or “high” phase.  The status bars are configurable and are described more fully in the help file Program Options Screen – Status Bars Tab.

 

Note: Status events will only occur when the status bar enters that phase from another phase.  This means that if the status bar was in the median phase, then enters the low phase, the low command will fire.  If the bar was already in the low phase, the low command will not fire

 

Group Selection Box

Status Events are also assigned into groups.  Choosing a group in this field will populate the status fields with all the commands and/or sounds unique to that group.

 

Note: Status events will fire with whatever the currently active group is.  This is slightly different as to how normal events activate.  For example, if you have an command assigned to low Hit Points in both the BASE and TEST groups, and the TEST group is active, the command assigned to the TEST group is the one that activates.  If the BASE group is active, then that one assigned to the BASE group fires

 

Clear Buttons (eraser icon)

Pressing this button will clear the entire command line for that status event.  This includes the command text and any associated sound.

 

Commands Field

When the appropriate status event occurs, this command will be fired off.

 

Choose Sound Buttons (small loudspeaker icon)

These buttons behave exactly as the Attach a Sound to This Event Buttons described above.

 

Edit Sound Fields

These fields behave exactly as the Sound Field described above.

 

Play Sound Buttons (musical notes icon)

These buttons behave exactly as the Play Sound Button described above.

 

Clear Sound Buttons (small loudspeaker w/eraser icon)

These buttons behave exactly as the Clear Sound Button described above.

 

Close Button

Closes the Events Screen.

 
Quick Events

Quick events are greatly useful when you just want to quickly generate an event/command pairing.  For example, if every time you saw the word smile, you wanted to dance, you would press the Quick Event button to bring up the Quick Event screen, then you would enter “smile” in the event text and “dance” as the command and press the Accept button.  This instantly creates a useful event.

 

The Quick Event screen is available from the Events screen or the Main Screen.

 

The Quick Event screen will also create variables for you on the fly (if they don’t already exist).  Basically use the following example…

 

Event Text:        @a smiles at you

Command:        smile lc(@a)

 

That creates an event that will capture anyone smiling at you, then command you to smile back at them.  If “Bob” were to smile at you, then “Bob” is placed into variable @a (which was created instantly).  Then, the command “smile lc(@a)” replaces @a with “Bob” and the lc() function lowercases it to “bob” which then results in “smile bob”  Neat huh?

 

It’s best to use system-resident variables such as @AA, @BB, … @FF when using events such as these, that way you’re not creating a bunch of dummy variables that just take up space.  You can also use quick events with system variables too.

 

Event Text:        Your HP is now: @HP

Command:        <blank>

 

This will assign @HP with the appropriate values.  You don’t need a command when creating a quick event (as in this example), but you can certainly put one there if you like.